<html>
<head><meta charset="utf-8"><title>gimli regressions · t-compiler/performance · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/index.html">t-compiler/performance</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html">gimli regressions</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205492130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205492130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205492130">(Jul 30 2020 at 15:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you expressed some interest in my "loading all structs comment" -- basically, I'm referring to the fact that even though the public API of libstd didn't change at all as a result of the PR, we are still decoding and utilizing a ton more metadata (e.g., <a href="https://perf.rust-lang.org/detailed-query.html?commit=59c859c74c32bb26ba7c0932ec50c6c566eeac76&amp;base_commit=6b269e44322cfca727fd0e793d3a60bd371cbcae&amp;benchmark=helloworld-check&amp;run_name=full">for helloworld</a>)</p>



<a name="205492205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205492205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205492205">(Jul 30 2020 at 15:19)</a>:</h4>
<p>local evaluation seems to conclude the majority of that comes from <code>has_drop</code> checking and such, but I've not had time to look further</p>



<a name="205492371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205492371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205492371">(Jul 30 2020 at 15:20)</a>:</h4>
<p>My <em>guess</em> is that when we ask for "does X implement drop" that somehow boils down to "What types implement Drop" which then proceeds to examine all types -- but this is purely based on a quick glance at the backtrace and such</p>



<a name="205492509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205492509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205492509">(Jul 30 2020 at 15:21)</a>:</h4>
<p>e.g.</p>
<div class="codehilite"><pre><span></span><code>      &quot;rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::type_of&quot;,
    &quot;&lt;rustc_query_system::query::caches::DefaultCache&lt;K,V&gt; as rustc_query_system::query::caches::QueryCache&gt;::lookup&quot;,
    &quot;rustc_middle::ty::query::TyCtxtAt::type_of&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::type_of&quot;,
    &quot;rustc_middle::ty::trait_def::trait_impls_of_provider::{{closure}}&quot;,
    &quot;rustc_middle::ty::trait_def::trait_impls_of_provider&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::trait_impls_of&gt;::compute&quot;,
    &quot;&lt;rustc_query_system::query::caches::ArenaCache&lt;K,V&gt; as rustc_query_system::query::caches::QueryCache&gt;::lookup&quot;,
    &quot;rustc_middle::ty::query::TyCtxtAt::trait_impls_of&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::trait_impls_of&quot;,
    &quot;rustc_middle::ty::trait_def::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::for_each_relevant_impl&quot;,
    &quot;rustc_trait_selection::traits::select::candidate_assembly::&lt;impl rustc_trait_selection::traits::select::SelectionContext&gt;::assemble_candidates_from_impls&quot;,
    &quot;rustc_trait_selection::traits::select::candidate_assembly::&lt;impl rustc_trait_selection::traits::select::SelectionContext&gt;::assemble_candidates&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::candidate_from_obligation_no_cache&quot;,
    &quot;rustc_trait_selection::traits::select::candidate_assembly::&lt;impl rustc_trait_selection::traits::select::SelectionContext&gt;::candidate_from_obligation::{{closure}}&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::in_task::{{closure}}&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::in_task&quot;,
    &quot;rustc_trait_selection::traits::select::candidate_assembly::&lt;impl rustc_trait_selection::traits::select::SelectionContext&gt;::candidate_from_obligation&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluate_stack&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluate_trait_predicate_recursively::{{closure}}&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::in_task::{{closure}}&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::in_task&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluate_trait_predicate_recursively&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluate_root_obligation::{{closure}}&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluation_probe::{{closure}}&quot;,
    &quot;rustc_infer::infer::InferCtxt::probe&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluation_probe&quot;,
    &quot;rustc_trait_selection::traits::select::SelectionContext::evaluate_root_obligation&quot;,
    &quot;rustc_traits::evaluate_obligation::evaluate_obligation::{{closure}}&quot;,
    &quot;rustc_infer::infer::InferCtxtBuilder::enter_with_canonical::{{closure}}&quot;,
    &quot;rustc_infer::infer::InferCtxtBuilder::enter&quot;,
    &quot;rustc_infer::infer::InferCtxtBuilder::enter_with_canonical&quot;,
    &quot;rustc_traits::evaluate_obligation::evaluate_obligation&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::evaluate_obligation&gt;::compute&quot;,
    &quot;&lt;rustc_query_system::query::caches::DefaultCache&lt;K,V&gt; as rustc_query_system::query::caches::QueryCache&gt;::lookup&quot;,
    &quot;rustc_middle::ty::query::TyCtxtAt::evaluate_obligation&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::evaluate_obligation&quot;,
    &quot;&lt;rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt&gt;::evaluate_obligation&quot;,
    &quot;&lt;rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt&gt;::evaluate_obligation_no_overflow&quot;,
    &quot;&lt;rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt&gt;::predicate_must_hold_modulo_regions&quot;,
    &quot;rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions&quot;,
    &quot;rustc_ty::common_traits::is_item_raw::{{closure}}&quot;,
    &quot;rustc_infer::infer::InferCtxtBuilder::enter&quot;,
    &quot;rustc_ty::common_traits::is_item_raw&quot;,
    &quot;rustc_ty::common_traits::is_copy_raw&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::is_copy_raw&gt;::compute&quot;,
    &quot;&lt;rustc_query_system::query::caches::DefaultCache&lt;K,V&gt; as rustc_query_system::query::caches::QueryCache&gt;::lookup&quot;,
    &quot;rustc_middle::ty::query::TyCtxtAt::is_copy_raw&quot;,
    &quot;rustc_middle::ty::util::&lt;impl rustc_middle::ty::TyS&gt;::is_copy_modulo_regions&quot;,
    &quot;&lt;rustc_ty::needs_drop::NeedsDropTypes&lt;F&gt; as core::iter::traits::iterator::Iterator&gt;::next&quot;,
    &quot;rustc_ty::needs_drop::needs_drop_raw&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::needs_drop_raw&gt;::compute&quot;,
    &quot;&lt;rustc_query_system::query::caches::DefaultCache&lt;K,V&gt; as rustc_query_system::query::caches::QueryCache&gt;::lookup&quot;,
    &quot;rustc_middle::ty::query::TyCtxtAt::needs_drop_raw&quot;,
    &quot;rustc_middle::ty::query::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::needs_drop_raw&quot;,
    &quot;rustc_middle::ty::util::&lt;impl rustc_middle::ty::TyS&gt;::needs_drop&quot;,
    &quot;rustc_mir_build::hair::cx::Cx::needs_drop&quot;,
    &quot;rustc_mir_build::build::scope::&lt;impl rustc_mir_build::build::Builder&gt;::schedule_drop&quot;,
    &quot;rustc_mir_build::build::expr::as_temp::&lt;impl rustc_mir_build::build::Builder&gt;::expr_as_temp&quot;,
</code></pre></div>



<a name="205492938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205492938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205492938">(Jul 30 2020 at 15:25)</a>:</h4>
<p>that backtrace accounts for 667 calls to type_of, which is 83% of them. gimli increases the amount of calls by 320</p>



<a name="205493110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205493110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205493110">(Jul 30 2020 at 15:26)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="119009">@eddyb</span> as well</p>



<a name="205494382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205494382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205494382">(Jul 30 2020 at 15:37)</a>:</h4>
<p>if you can get a query stack instead of a raw backtrace that would be easier to read I think</p>



<a name="205494411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205494411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205494411">(Jul 30 2020 at 15:37)</a>:</h4>
<p>if you pulled this out of gdb it might be tricky though</p>



<a name="205494801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205494801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205494801">(Jul 30 2020 at 15:40)</a>:</h4>
<p>oh no this is manual <code>Backtrace::force_capture()</code> and then parsing stderr :)</p>



<a name="205494821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205494821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205494821">(Jul 30 2020 at 15:40)</a>:</h4>
<p>but pulling queries out of this is pretty easy</p>



<a name="205494967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205494967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205494967">(Jul 30 2020 at 15:42)</a>:</h4>
<p>needs_drop_raw -&gt; is_copy_raw -&gt; evaluate_obligation -&gt; trait_impls_of -&gt; type_of</p>



<a name="205534872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205534872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205534872">(Jul 30 2020 at 21:29)</a>:</h4>
<p>hmm</p>



<a name="205534880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205534880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205534880">(Jul 30 2020 at 21:29)</a>:</h4>
<p>that's quite interesting, <span class="user-mention" data-user-id="116122">@simulacrum</span>, thanks</p>



<a name="205534918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205534918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205534918">(Jul 30 2020 at 21:29)</a>:</h4>
<p>I'm not sure how much we can sidestep that, but we might be able to, I think that what happens there is that we wind up loading <em>all</em> impls from <em>all</em> crates and hashing them effectively by the self type...</p>



<a name="205534993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205534993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205534993">(Jul 30 2020 at 21:30)</a>:</h4>
<p>Hm perhaps. I think we should at <em>least</em> not be loading a bunch of stuff cross-crate to evaluate things like is_drop</p>



<a name="205534999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205534999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205534999">(Jul 30 2020 at 21:30)</a>:</h4>
<p>er, needs_drop</p>



<a name="205535017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205535017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205535017">(Jul 30 2020 at 21:30)</a>:</h4>
<p>we should just load a single byte/bit for that, really</p>



<a name="205535041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205535041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205535041">(Jul 30 2020 at 21:30)</a>:</h4>
<p>it's "hard" to compute and is all but guaranteed to be needed in the crate we're loading anyway</p>



<a name="205587670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205587670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205587670">(Jul 31 2020 at 13:04)</a>:</h4>
<p>It's true that we could probably specialize the <code>Drop</code> trait.</p>



<a name="205587678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205587678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205587678">(Jul 31 2020 at 13:04)</a>:</h4>
<p>It has a lot of special properties</p>



<a name="205587698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205587698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205587698">(Jul 31 2020 at 13:04)</a>:</h4>
<p>e.g., it's either implemented <em>for all instances of a given struct</em> or <em>none</em></p>



<a name="205587711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205587711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205587711">(Jul 31 2020 at 13:05)</a>:</h4>
<p><del>really, it's not a trait at all...</del></p>



<a name="205648044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205648044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205648044">(Jul 31 2020 at 22:27)</a>:</h4>
<p>Not sure if this is related, but <code>drop_in_place</code> is usually the function that results in the most LLVM IR production.</p>



<a name="205649462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205649462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205649462">(Jul 31 2020 at 22:49)</a>:</h4>
<p>Seems unrelated, but I've noticed the same</p>



<a name="205649519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205649519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205649519">(Jul 31 2020 at 22:50)</a>:</h4>
<p>I've been meaning to look into the MIR shim code more deeply to maybe improve this</p>



<a name="205676876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205676876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205676876">(Aug 01 2020 at 11:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> oh wow I didn't expect it to actually need to look at crates. we can easily add a cross-crate has_drop (assuming it's a query) that looks only at that crate's metadata</p>



<a name="205676883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205676883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205676883">(Aug 01 2020 at 11:13)</a>:</h4>
<p>so for Vec it would look in liballoc's entry for Vec</p>



<a name="205676927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205676927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205676927">(Aug 01 2020 at 11:14)</a>:</h4>
<p>now that still leaves collecting all of the Drop impls</p>



<a name="205676954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205676954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205676954">(Aug 01 2020 at 11:15)</a>:</h4>
<p>we could do the indexing better than we do now and have the <code>DefId</code>-based cases of the "simplified type" indexing mechanism only look up in the crate where that type was defined. ugh actually this sounds like it would mess with a lot of other different trait system situatons</p>



<a name="205676995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205676995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205676995">(Aug 01 2020 at 11:16)</a>:</h4>
<p>but every single trait has this problem of wanting to collect the universe of impls, it's not just Drop</p>



<a name="205677005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677005">(Aug 01 2020 at 11:16)</a>:</h4>
<p>so at the very least we could store the "trait impls" in rmeta indexed by the simplified type, so we don't have to call <code>type_of</code> to find that out</p>



<a name="205677019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677019">(Aug 01 2020 at 11:17)</a>:</h4>
<p>and that's enough to filter non-blanket impls down to one impl in most cases</p>



<a name="205677026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677026">(Aug 01 2020 at 11:17)</a>:</h4>
<p>or at least all the impls being in the same crate etc.</p>



<a name="205677101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677101">(Aug 01 2020 at 11:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> so my minimal suggestion would be to make <a href="https://github.com/rust-lang/rust/blob/b5eae9c44d713779a08e6db352088d45cad3e9b6/src/librustc_metadata/rmeta/mod.rs#L233-L237">cross-crate trait impls</a> be stored more like <a href="https://github.com/rust-lang/rust/blob/b5eae9c44d713779a08e6db352088d45cad3e9b6/src/librustc_middle/ty/trait_def.rs#L67-L71">in-memory trait impls</a></p>



<a name="205677146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677146">(Aug 01 2020 at 11:20)</a>:</h4>
<p>especially the grouping by <code>SimplifiedType</code>. at the very least, replacing <code>DefIndex</code> elements by <code>(Option&lt;SimplifiedType&gt;, DefIndex)</code></p>



<a name="205677167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677167">(Aug 01 2020 at 11:21)</a>:</h4>
<p>even if the list of impls isn't loaded any more lazily, at least <a href="https://github.com/rust-lang/rust/blob/b5eae9c44d713779a08e6db352088d45cad3e9b6/src/librustc_middle/ty/trait_def.rs#L208-L210">this loop</a> will be able to insert into <code>impls</code> itself instead of using <code>add_impl</code> which has to use <code>type_of</code></p>



<a name="205677170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677170">(Aug 01 2020 at 11:21)</a>:</h4>
<p>and the only downside should be the size of the <code>.rmeta</code>/<code>.rlib</code> on disk, but hopefully not by much</p>



<a name="205677215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677215">(Aug 01 2020 at 11:22)</a>:</h4>
<p>(please PM me if you want to get a hold of me, I'm behind looking at mentions for now)</p>



<a name="205677220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205677220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205677220">(Aug 01 2020 at 11:23)</a>:</h4>
<p>actually, argh, this seems simple enough that I want to try doing it now</p>



<a name="205678744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205678744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205678744">(Aug 01 2020 at 12:10)</a>:</h4>
<p>yeah that was easy, will open the PR in a bit</p>



<a name="205681518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681518">(Aug 01 2020 at 13:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> hopefully this helps <a href="https://github.com/rust-lang/rust/pull/75008">https://github.com/rust-lang/rust/pull/75008</a></p>



<a name="205681735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681735">(Aug 01 2020 at 13:36)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> so just to make sure I understand -- right now, when checking e.g. <code>T: Copy</code> in the compiler, we load <em>all</em> impls for Copy and then try and find if T is in that set?</p>



<a name="205681751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681751">(Aug 01 2020 at 13:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> yes, but when we load the impls we bin them by the outermost level of the <code>Self</code> type</p>



<a name="205681764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681764">(Aug 01 2020 at 13:37)</a>:</h4>
<p>so that we check if <code>Vec</code> impls <code>Copy</code>, that's <code>O(1)</code></p>



<a name="205681768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681768">(Aug 01 2020 at 13:37)</a>:</h4>
<p>oh, is the loading done once?</p>



<a name="205681773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681773">(Aug 01 2020 at 13:37)</a>:</h4>
<p>especially since there are no blanket impls of <code>Copy</code> - well, maybe <code>&amp;_</code> impls count as blanket</p>



<a name="205681823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681823">(Aug 01 2020 at 13:38)</a>:</h4>
<p>well everything is cached in rustc, the main distinction is granularity and eager vs lazy</p>



<a name="205681889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681889">(Aug 01 2020 at 13:40)</a>:</h4>
<p>What's the cache key though? Vec? Copy?</p>



<a name="205681892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681892">(Aug 01 2020 at 13:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> to put it another way, we more or less only read every byte in the <code>.rmeta</code> <em>at most</em> once</p>



<a name="205681905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681905">(Aug 01 2020 at 13:40)</a>:</h4>
<p>there's some stuff that does double-duty and the tables, but that's not relevant here</p>



<a name="205681910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681910">(Aug 01 2020 at 13:41)</a>:</h4>
<p>okay yeah I should explain it better</p>



<a name="205681915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681915">(Aug 01 2020 at 13:41)</a>:</h4>
<p>so when you want to know anything about what implements <code>Copy</code>, <code>traits_impls_of(Copy)</code> is computed</p>



<a name="205681929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681929">(Aug 01 2020 at 13:42)</a>:</h4>
<p>that holds all of the impls of <code>Copy</code> in the crate graph, <em>indexed</em> by the "simplified <code>Self</code> type"</p>



<a name="205681971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681971">(Aug 01 2020 at 13:42)</a>:</h4>
<p>the indexing is important for making using <code>traits_impls_of</code>'s result later, much cheaper</p>



<a name="205681984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681984">(Aug 01 2020 at 13:43)</a>:</h4>
<p>it's also why you were seeing all of those <code>type_of</code> calls, because <code>traits_impls_of(Drop)</code> will call <code>type_of</code> for every <code>Drop</code> impl in the crate graph in order to compute the "simplified <code>Self</code> type"</p>



<a name="205681992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681992">(Aug 01 2020 at 13:43)</a>:</h4>
<p>Right, yeah</p>



<a name="205681996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681996">(Aug 01 2020 at 13:43)</a>:</h4>
<p>so my PR should remove that cost, or at least replace it with a smaller deserialization cost</p>



<a name="205681998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205681998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205681998">(Aug 01 2020 at 13:43)</a>:</h4>
<p>It feels like we shouldn't even be querying "All traits in the world" so to speak</p>



<a name="205682001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682001">(Aug 01 2020 at 13:43)</a>:</h4>
<p>I'm becoming increasingly suspicious of it helping, but maybe our type deserialization is inefficient</p>



<a name="205682041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682041">(Aug 01 2020 at 13:44)</a>:</h4>
<p>there's nothing that's "all traits"</p>



<a name="205682044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682044">(Aug 01 2020 at 13:44)</a>:</h4>
<p>er, I meant all impls, sorry</p>



<a name="205682048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682048">(Aug 01 2020 at 13:44)</a>:</h4>
<p>like "impls of Copy" is a really large set</p>



<a name="205682053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682053">(Aug 01 2020 at 13:44)</a>:</h4>
<p>okay so the problem with that is we don't know what else to do</p>



<a name="205682061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682061">(Aug 01 2020 at 13:44)</a>:</h4>
<p>We can't store what traits a type implements?</p>



<a name="205682063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682063">(Aug 01 2020 at 13:44)</a>:</h4>
<p>we can better index them, but they're <code>impl</code>s which means they pattern-match</p>



<a name="205682075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682075">(Aug 01 2020 at 13:45)</a>:</h4>
<p>I was telling <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> this a couple weeks ago, come to think of it</p>



<a name="205682086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682086">(Aug 01 2020 at 13:45)</a>:</h4>
<p>at best we can index common cases (which is what the "simplified <code>Self</code> type" thing is for), but we can't efficiently store <em>all</em> possible impls</p>



<a name="205682135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682135">(Aug 01 2020 at 13:46)</a>:</h4>
<p>it seems like at least we should try to avoid deserializing all impls if we can help it</p>



<a name="205682147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682147">(Aug 01 2020 at 13:46)</a>:</h4>
<p>but maybe that's not the right thinking</p>



<a name="205682150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682150">(Aug 01 2020 at 13:46)</a>:</h4>
<p>that's the third paragraph in the PR description</p>



<a name="205682155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682155">(Aug 01 2020 at 13:46)</a>:</h4>
<p>making it lazy based on the "indexing key"</p>



<a name="205682166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682166">(Aug 01 2020 at 13:47)</a>:</h4>
<p>well I meant not so much with Self type as even just saying "hey we're checking for Copy on type Bar, which is declared in crate std, so we only need to load impls of Copy in std"?</p>



<a name="205682167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682167">(Aug 01 2020 at 13:47)</a>:</h4>
<p>(so only "blanket impls", i.e. those without a useful "shallow simplifiable <code>Self</code> type" would be eager)</p>



<a name="205682221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682221">(Aug 01 2020 at 13:48)</a>:</h4>
<p>plus blanket impls, sure, I guess -- so impls in the two crates, the one declaring the trait and the one defining the self type</p>



<a name="205682225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682225">(Aug 01 2020 at 13:48)</a>:</h4>
<p>impls pattern-match. you can't assume stuff like that</p>



<a name="205682232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682232">(Aug 01 2020 at 13:48)</a>:</h4>
<p>maybe I should use examples?</p>



<a name="205682235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682235">(Aug 01 2020 at 13:49)</a>:</h4>
<p><code>impl From&lt;MyType&gt; for ExternalType</code> is a thing IIRC</p>



<a name="205682245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682245">(Aug 01 2020 at 13:49)</a>:</h4>
<p>you can't trivially rely on coherence rules to simplify this</p>



<a name="205682246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682246">(Aug 01 2020 at 13:49)</a>:</h4>
<p>at best you look for "<code>Bar: Copy</code>" impls in all crates instead of "<code>_: Copy</code>" impls</p>



<a name="205682295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682295">(Aug 01 2020 at 13:50)</a>:</h4>
<p>or you special-case traits without extra generics, maybe there the coherence is simple enough?</p>



<a name="205682300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682300">(Aug 01 2020 at 13:50)</a>:</h4>
<p>I guess</p>



<a name="205682304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682304">(Aug 01 2020 at 13:50)</a>:</h4>
<p>Yeah, that's a good point</p>



<a name="205682306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682306">(Aug 01 2020 at 13:50)</a>:</h4>
<p>you still have tuples in <code>Self</code> so you need to make sure all of those are treated as blanket impls</p>



<a name="205682314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682314">(Aug 01 2020 at 13:50)</a>:</h4>
<p>and blanket impls need to be loaded from the entire crate graph. maybe it's the wrong term but it's the one used in the code</p>



<a name="205682327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682327">(Aug 01 2020 at 13:51)</a>:</h4>
<p>"blanket impl" here doesn't mean 100% generic, it means "cannot be easily simplified"</p>



<a name="205682338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682338">(Aug 01 2020 at 13:51)</a>:</h4>
<p>sure</p>



<a name="205682339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682339">(Aug 01 2020 at 13:51)</a>:</h4>
<p>it could very well have 0 generic parameters and be in some random crate</p>



<a name="205682344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682344">(Aug 01 2020 at 13:51)</a>:</h4>
<p>so yeah the name is bad :P</p>



<a name="205682731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682731">(Aug 01 2020 at 14:01)</a>:</h4>
<p>I started on writing a query for this l</p>



<a name="205682744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682744">(Aug 01 2020 at 14:01)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> can you take a look at <a href="https://github.com/rust-lang/rust/pull/74489">https://github.com/rust-lang/rust/pull/74489</a> ?</p>



<a name="205682810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682810">(Aug 01 2020 at 14:02)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> can you sort it out with <span class="user-mention" data-user-id="116009">@nikomatsakis</span> ?</p>



<a name="205682822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682822">(Aug 01 2020 at 14:03)</a>:</h4>
<p>Sure</p>



<a name="205682834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682834">(Aug 01 2020 at 14:03)</a>:</h4>
<p>I'm not sure my implementation actually does what you want, it still loads every crate to look at the impls</p>



<a name="205682836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682836">(Aug 01 2020 at 14:03)</a>:</h4>
<p>the only reason I made my own PR was that it only took me a bit, I really can't get too dragged into much else</p>



<a name="205682937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682937">(Aug 01 2020 at 14:05)</a>:</h4>
<p>it looks like you're "transposing" the trait vs implementor indexing, in a way that doesn't seem like the trait system would need/want to use (because we already have one, or a small number of, traits we look at)</p>



<a name="205682952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205682952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205682952">(Aug 01 2020 at 14:06)</a>:</h4>
<p>suggestions and rustdoc are the places I can think of that ever want anything related to the entire set of traits in the crate graph</p>



<a name="205683000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205683000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205683000">(Aug 01 2020 at 14:06)</a>:</h4>
<p>not to mention that if you compute this in a crate and store in the crate metadata, it will be wrong as it will not include downstream impls</p>



<a name="205683003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205683003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205683003">(Aug 01 2020 at 14:06)</a>:</h4>
<p>anyway that's my quick look</p>



<a name="205695574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695574">(Aug 01 2020 at 19:47)</a>:</h4>
<p><em>wow</em>, <span class="user-mention" data-user-id="119009">@eddyb</span> you should see these perf results for your PR <a href="https://perf.rust-lang.org/compare.html?start=dfe1e3b641abbede6230e3931d14f0d43e5b8e54&amp;end=128201b46cdfa059217962ae2f159583e0ae5f93">https://perf.rust-lang.org/compare.html?start=dfe1e3b641abbede6230e3931d14f0d43e5b8e54&amp;end=128201b46cdfa059217962ae2f159583e0ae5f93</a></p>



<a name="205695575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695575">(Aug 01 2020 at 19:47)</a>:</h4>
<p>it's like -20% on hello world and -5% for a good number of others</p>



<a name="205695690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695690">(Aug 01 2020 at 19:51)</a>:</h4>
<p>that's a bit much</p>



<a name="205695692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695692">(Aug 01 2020 at 19:51)</a>:</h4>
<p><em>surely</em> deserializing a few types here and there shouldn't be <em>that</em> more expensive</p>



<a name="205695693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695693">(Aug 01 2020 at 19:51)</a>:</h4>
<p>we must be doing a few things wrong. or suboptimally, rather</p>



<a name="205695747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695747">(Aug 01 2020 at 19:53)</a>:</h4>
<p>ripgrep is I think the "realistic project" benchmark with the biggest win, and it's still surprisingly large</p>



<a name="205695750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695750">(Aug 01 2020 at 19:53)</a>:</h4>
<p>anyway this is what happens when you profile :P (<span class="user-mention" data-user-id="116122">@simulacrum</span> in this case)</p>



<a name="205695783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695783">(Aug 01 2020 at 19:54)</a>:</h4>
<p>why do we decode <code>item_attrs</code>??</p>



<a name="205695801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695801">(Aug 01 2020 at 19:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> oh god is this some cursed thing about <code>ty::AdtDef</code> needing to exist for <code>ty::Adt</code> (as opposed to just having a <code>DefId</code>) therefore kilobytes of doc comments getting loaded?</p>



<a name="205695809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695809">(Aug 01 2020 at 19:55)</a>:</h4>
<p>I'm looking <a href="https://perf.rust-lang.org/detailed-query.html?commit=128201b46cdfa059217962ae2f159583e0ae5f93&amp;base_commit=dfe1e3b641abbede6230e3931d14f0d43e5b8e54&amp;benchmark=ripgrep-check&amp;run_name=incr-patched:%20println">at these query details</a></p>



<a name="205695817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205695817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205695817">(Aug 01 2020 at 19:55)</a>:</h4>
<p>helloworld <a href="https://perf.rust-lang.org/detailed-query.html?commit=128201b46cdfa059217962ae2f159583e0ae5f93&amp;base_commit=dfe1e3b641abbede6230e3931d14f0d43e5b8e54&amp;benchmark=helloworld-check&amp;run_name=incr-full">tells a similar story</a></p>



<a name="205701337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205701337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205701337">(Aug 01 2020 at 22:46)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> I removed an item attrs call for non exhaustive recently, that was a small win too.</p>
<p>I suspect we should work to either make decoding attributes much faster or work to eliminate it entirely, it really shouldn't be necessary I think - we should be able to place already decoded attributes in metadata</p>



<a name="205701346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205701346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205701346">(Aug 01 2020 at 22:47)</a>:</h4>
<p>Cc <span class="user-mention" data-user-id="120989">@njn</span> it looks like <span class="user-mention" data-user-id="119009">@eddyb</span>'s PR may be eliminating all of the gimli regressions (plus some more wins)</p>



<a name="205813109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205813109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205813109">(Aug 03 2020 at 16:07)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> I've been wanting to experiment with replacing <code>AdtDef</code> with just a <code>DefId</code> in the type variant</p>



<a name="205813174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205813174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205813174">(Aug 03 2020 at 16:08)</a>:</h4>
<p>just to make it more analogous with most things</p>



<a name="205813183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205813183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205813183">(Aug 03 2020 at 16:08)</a>:</h4>
<p>no idea if it would have perf impact though</p>



<a name="205819067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205819067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205819067">(Aug 03 2020 at 16:58)</a>:</h4>
<p>I'm worried there are things that rely on it being  cheap to access some information</p>



<a name="205819087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/205819087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#205819087">(Aug 03 2020 at 16:58)</a>:</h4>
<p>but I would prefer if that was a <code>DefId</code></p>



<a name="206198615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206198615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206198615">(Aug 06 2020 at 21:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> btw you used backtraces but we could theoretically take two <code>-Zself-profile</code> outputs and get a diff <em>flamegraph</em> (or chrome profile), sadly I think we'd need two outputs, one that's "added" and one that's "removed" (cc <span class="user-mention" data-user-id="125250">@Wesley Wiser</span>)</p>



<a name="206198686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206198686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206198686">(Aug 06 2020 at 21:22)</a>:</h4>
<p>in that we could see the <em>query call traces</em> being added, not just contextless query names and counts</p>



<a name="206198732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206198732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206198732">(Aug 06 2020 at 21:23)</a>:</h4>
<p>in fact we could have a one-level version of this (to limit the amount of data we need to keep) for the <a href="http://perf.rust-lang.org">perf.rust-lang.org</a> UI</p>



<a name="206198758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206198758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206198758">(Aug 06 2020 at 21:23)</a>:</h4>
<p>so when we have a delta in the number of executions, we can show <em>what callers</em> they're from</p>



<a name="206199059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199059">(Aug 06 2020 at 21:26)</a>:</h4>
<p>but with a manual run we can go <em>all the way</em> to recording query keys and just having an exact delta</p>



<a name="206199063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199063">(Aug 06 2020 at 21:26)</a>:</h4>
<p>Yeah I'd be fine with that - backtraces are even more fine-grained of course</p>



<a name="206199098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199098">(Aug 06 2020 at 21:27)</a>:</h4>
<p>To be honest I'm not worried about data storage, I'd be fine with however much data we need to store for perf.rlo</p>



<a name="206199112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199112">(Aug 06 2020 at 21:27)</a>:</h4>
<p>It's more so cost of collection that's a concern</p>



<a name="206199116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199116">(Aug 06 2020 at 21:27)</a>:</h4>
<p>But presumably it's not too bad</p>



<a name="206199131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199131">(Aug 06 2020 at 21:27)</a>:</h4>
<p>oh. could we just keep the profile files? or are they too big</p>



<a name="206199153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199153">(Aug 06 2020 at 21:27)</a>:</h4>
<p>I guess we do need to process them down otherwise rendering incurs the cost of loading them every time</p>



<a name="206199240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199240">(Aug 06 2020 at 21:28)</a>:</h4>
<p>anyway the reason I say this is that all it took for me to make that PR was <code>trait_impls_of -&gt; type_of</code></p>



<a name="206199247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199247">(Aug 06 2020 at 21:28)</a>:</h4>
<p>Are they self contained? I forget if we need the rustc binary around or anything</p>



<a name="206199264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199264">(Aug 06 2020 at 21:28)</a>:</h4>
<p>and now we basically want to repeat for the next largest such edge</p>



<a name="206199271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199271">(Aug 06 2020 at 21:29)</a>:</h4>
<p>If they're self contained we should probably just start putting them in s3</p>



<a name="206199275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199275">(Aug 06 2020 at 21:29)</a>:</h4>
<p>no, the entire thing is a string templating machine</p>



<a name="206199306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199306">(Aug 06 2020 at 21:29)</a>:</h4>
<p>like it's extremely self-contained, to a degree that almost starts bothering me but I guess strings are fine with that much of overengineering lol</p>



<a name="206199332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199332">(Aug 06 2020 at 21:29)</a>:</h4>
<p>Okay so we can definitely just stick them in the database or s3</p>



<a name="206199344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199344">(Aug 06 2020 at 21:29)</a>:</h4>
<p>(probably s3 is better)</p>



<a name="206199404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199404">(Aug 06 2020 at 21:30)</a>:</h4>
<p>I can look at doing that today or tomorrow</p>



<a name="206199439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199439">(Aug 06 2020 at 21:30)</a>:</h4>
<p>I don't think they're that big</p>



<a name="206199622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199622">(Aug 06 2020 at 21:32)</a>:</h4>
<p>I wish I suggested this earlier, I thought the reason we weren't collecting was the size but never asked</p>



<a name="206199644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199644">(Aug 06 2020 at 21:33)</a>:</h4>
<p>I forget - there was I think some concern about size at some point</p>



<a name="206199678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199678">(Aug 06 2020 at 21:33)</a>:</h4>
<p>But more so because of bandwidth iirc and how long it took than the size itself</p>



<a name="206199696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206199696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206199696">(Aug 06 2020 at 21:33)</a>:</h4>
<p>Maybe we can compress? I'll look</p>



<a name="206328614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206328614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206328614">(Aug 08 2020 at 03:12)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> we now save off the raw results into S3 and even have crox and flamegraph links on the self profile pages (e.g., see <a href="https://perf.rust-lang.org/detailed-query.html?commit=f3a9de9b08659e20ce7c282ed77bc43ddd149107&amp;benchmark=helloworld-opt&amp;run_name=full">https://perf.rust-lang.org/detailed-query.html?commit=f3a9de9b08659e20ce7c282ed77bc43ddd149107&amp;benchmark=helloworld-opt&amp;run_name=full</a>)</p>



<a name="206328625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206328625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206328625">(Aug 08 2020 at 03:12)</a>:</h4>
<p>not yet sure -- it's pretty slow to generate flamegraphs and crox files on-demand (which is what we currently do), so may need to cache those somehow (e.g., on first hit save them to S3 and serve from there)</p>



<a name="206328631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206328631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206328631">(Aug 08 2020 at 03:13)</a>:</h4>
<p>maybe the measureme data format is not best, too, for long-term storage (cc <span class="user-mention" data-user-id="125250">@Wesley Wiser</span>)</p>



<a name="206335118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/gimli%20regressions/near/206335118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/gimli.20regressions.html#206335118">(Aug 08 2020 at 06:36)</a>:</h4>
<p>wow</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>